package ming.model.type;

import java.util.UUID;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.apache.commons.lang.StringUtils;
@SuppressWarnings("serial")
@Entity
@Table(name = "z_tm_warnlog")
public class Warnlog implements java.io.Serializable {

	// Fields

	private String id;
	private Warnstate warnstate;
	private String terminal;
	private String studentNo;
	private String studentName;
	private String major;
	private String warnTime;
	private Integer sendState;

	// Property accessors
	@Id
	@Column(name = "vcID", unique = true, nullable = false, length = 36)
	public String getId() {
		if (!StringUtils.isBlank(this.id)) {
			return this.id;
		}
		return UUID.randomUUID().toString();
	}

	public void setId(String id) {
		this.id = id;
	}

	@ManyToOne
	@JoinColumn(name = "vcWarnState_ID")
	public Warnstate getWarnstate() {
		return this.warnstate;
	}

	public void setWarnstate(Warnstate warnstate) {
		this.warnstate = warnstate;
	}

	@Column(name = "vcTerminal", length = 100)
	public String getTerminal() {
		return this.terminal;
	}

	public void setTerminal(String terminal) {
		this.terminal = terminal;
	}

	@Column(name = "vcStudentNo", length = 20)
	public String getStudentNo() {
		return this.studentNo;
	}

	public void setStudentNo(String studentNo) {
		this.studentNo = studentNo;
	}

	@Column(name = "vcStudentName", length = 100)
	public String getStudentName() {
		return this.studentName;
	}

	public void setStudentName(String studentName) {
		this.studentName = studentName;
	}

	@Column(name = "vcMajor", length = 100)
	public String getMajor() {
		return this.major;
	}

	public void setMajor(String major) {
		this.major = major;
	}

	@Column(name = "dtWarnTime", length = 19)
	public String getWarnTime() {
		return this.warnTime;
	}

	public void setWarnTime(String warnTime) {
		this.warnTime = warnTime;
	}

	@Column(name = "intSendState")
	public Integer getSendState() {
		return this.sendState;
	}

	public void setSendState(Integer sendState) {
		this.sendState = sendState;
	}

}